package com.donglan.pethome.organization.controller;

import com.donglan.pethome.organization.domain.Employee;
import com.donglan.pethome.organization.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: zhangdonghui
 * @Date: 2022/1/7 14:33
 */
@RequestMapping("employee")
@RestController
public class EmployeeController {

    @Autowired
    private EmployeeService employeeService;

    /**
     * 查询所有的员工
     * @return
     */
    @PatchMapping("/loadAll")
    public List<Employee> loadAll(){
        return employeeService.loadAll();
    }

}
